const path = require('path');
function resolve(dir) {
  return path.join(__dirname, dir);
}
module.exports = {
  lintOnSave: false,
  configureWebpack: {
    resolve: {
      alias: {
        // @开头的为项目的别名路径
        '@': resolve('src'),
        '@router': resolve('src/router'),
        '@store': resolve('src/store'),
        '@assets': resolve('src/assets'),
        '@css': resolve('src/assets/css'),
        '@components': resolve('src/components'),
        '@views': resolve('src/views'),
        '@config': resolve('src/config')
      }
    }
  },
  devServer: {
    //open: true,
    proxy: {
      '/': {
        target: 'http://192.168.1.116',
        //target: 'http://wallet.dev_ipsb.io', // 116环境
        //target: 'http://localhost:3000/', // 本地
        ws: false,
        changeOrigin: true,
        /*pathRewrite: {
          '^/api/': '/'
        }*/
      }
    }
  },
  outputDir: 'html',//生成资源目标文件夹
  indexPath: './index.html',
  assetsDir: './spa',//静态资源目录
  filenameHashing: false //去掉文件哈希后缀
};
